<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1">
	<title>爱租网_个人中心</title>
	<link rel="icon" href="_img_/logo.ico"> 
	{css href="_js_/layui/css/layui.css"}
	{js href="_js_/jquery2.1.4.min.js"}
	{js href="_js_/layer/layer.js"}
	{js href="_js_/layui/layui.js"}
	{js href="_js_/jquery.validate.min.js"}
	{js href="_js_/jquery.form.js"}
	{js href="_js_/messages_zh.js"}
	<style>
		*{margin:0;padding:0;}
		.main{margin-left:170px;}
		.main>div{margin:10px 0;}
		.main>div>i{margin-right:5px;}
		.main>div>span{margin-left:15px;font-size:16px;color:#555555;}
    .edit{color:#ff3366;position:absolute;right:20px;top:10px;}
    .realname{color:#ff3366;position:absolute;right:20px;top:50px;}
		.okname{color:#ff3366;position:absolute;right:20px;top:50px;}
	</style>
</head>
<body>
	{include file="public/myself_menu"}
  <div class="main">
    <input type="hidden" value="{$data.nickname}">
  	<div>
  		<i class="layui-icon">&#xe612;</i>昵&nbsp;称：<span>{$data.nickname}</span>
  	</div>
  	<div>
  		<i class="layui-icon">&#xe661;</i>性&nbsp;别：<span>{$data.sex??'保密'}</span>
  	</div>
  	<div>
  		<i class="layui-icon">&#xe61b;</i>年&nbsp;龄：<span>{$data.age??'保密'}</span>
  	</div>
  	<div>
  		<i class="layui-icon">&#xe6af;</i>生&nbsp;日：<span>{$data.birth??'保密'}</span>
  	</div>
  	<div>
  		<i class="layui-icon">&#xe600;</i>星&nbsp;座：<span>{$data.star??'保密'}</span>
  	</div>
  	<div>
  		<i class="layui-icon">&#xe63b;</i>手&nbsp;机：<span>{$data.tel|substr_replace=###,'****',3,4}</span>
  	</div>
  	<div>
  		<i class="layui-icon">&#xe62e;</i>所在区：<span>{$data.name??'保密'}</span>
  	</div>
  	<div>
  		<i class="layui-icon">&#xe615;</i>租房状态：<span>{$data.renter?'在租':'保密'}</span>
  	</div>
  	<div>
  		<i class="layui-icon">&#xe631;</i>职&nbsp;业：<span>{$data.job??'保密'}</span>
  	</div>
  	<a class="edit" href="{:url('index/vip/edit')}">编辑资料</a>
    {eq name="$data.vname" value=""}
    <a class="realname" href="javascript:;">实名认证</a>
    {else}
    <a disabled class="okname" href="javascript:;">已实名认证</a>
    {/eq}
  </div>
</body>
</html>
<script type="text/javascript">

  $('.realname').click(function(){
    layer.prompt({title:'请输入身份证号'},function(value1,index1){
      layer.close(index1);
      layer.prompt({title:'请输入姓名'},function(value2,index2){
        layer.close(index2);
        var data = 'nickname='+$('input').val()+'&icd='+value1+'&vname='+value2;
        $.post('{:url('index/vip/do_realname1')}',data,function(res){
          if(res.msg == '成功'){
            layer.msg('认证成功',{icon:1,time:1000},function(){
              location.reload();
            })
          }
        })
      })
      
    });
  });

	layui.use('element', function(){
		  var element = layui.element;
		});
</script>